<template>
  <view class="index">
    <view class="jtop">
      <view class="status_bar"><!-- 这里是状态栏 --></view>
      <view class="jtop_l" @tap="navigateBack"
        ><image src="../../static/img/ic_back.png"></image>关闭</view
      >
      <view class="jtop_c">奖励</view>
    </view>
    <view class="tophr"></view>

    <view class="um_top">
      <image src="../../static/img/user/gg.png" class="um_top_c"></image>
    </view>
  </view>
</template>

<script>
import request from '@/common/request.js';
import { mapState, mapMutations } from 'vuex';

export default {
  computed: {
    ...mapState(['hasLogin', 'forcedLogin']),
  },
  onShow() {
    console.log('000000');

    uni.getLocation({
      type: 'gcj02',
      success: function(res) {
        console.log('111111');
        console.log('当前位置：' + res);
        console.log('当前位置的经度：' + res.longitude);
        console.log('当前位置的纬度：' + res.latitude);
      },
      fail: function() {
        console.log('22222s');
        this.repeat_click = true;
        uni.showToast({
          title: '获取地址失败，将导致部分功能不可用',
          icon: 'none',
        });
      },
    });
  },
  methods: {
    ...mapMutations(['logout']),
    bindLogin() {
      uni.navigateTo({
        url: '../login/login',
      });
    },
    bindLogout() {
      this.logout();
      /**
       * 如果需要强制登录跳转回登录页面
       */
      if (this.forcedLogin) {
        uni.reLaunch({
          url: '../login/login',
        });
      }
    },
    navigateBack() {
      uni.navigateBack();
    },
  },
};
</script>

<style>
.um_top {
  width: 750rpx;
  height: auto;
  display: block;
  float: left;
  margin: 30rpx 0rpx 0rpx;
}
.um_top_c {
  width: 750rpx;
  height: 1186rpx;
  display: block;
  float: left;
  margin: 0rpx 0rpx 0rpx;
}

.ueb {
  width: 100%;
  height: auto;
  display: block;
  float: left;
  margin: 20rpx 0 0 0;
  border: 1px solid #dddddd;
  border-left: 0;
  border-right: 0;
  background: #ffffff;
}
.ueb_logo {
  width: 304rpx;
  height: 250rpx;
  display: block;
  float: none;
  margin: 20rpx auto 0;
}
.uebs {
  width: 100%;
  height: auto;
  display: block;
  float: left;
  margin: 20rpx 0 0 0;
  border: 1px solid #dddddd;
  border-left: 0;
  border-right: 0;
  background: #ffffff;
}

.uebsb {
  width: 720rpx;
  margin: 0 0 0 30rpx;
  height: 90rpx;
  display: block;
  float: left;
  background: #ffffff;
  border-bottom: 1px solid #dddddd;
}
.uebsb_l {
  width: 150rpx;
  height: auto;
  display: block;
  float: left;
  margin: 24rpx 0;
  font-size: 34rpx;
  color: #000000;
}
.uebsb_lr {
  width: 500rpx;
  height: auto;
  display: block;
  float: right;
  margin: 24rpx 30rpx 0 0;
  font-size: 34rpx;
  color: #000000;
}
.uebsb_lr image {
  width: 36rpx;
  height: 36rpx;
  display: inline-block;
  float: none;
  margin: 0rpx 0 -10rpx 10rpx;
}
.uebsb_lr2 {
  font-size: 28rpx;
  margin-top: 30rpx;
}
.uebsb_lr3 {
  color: #0056ff;
}

.index {
  background: rgb(242, 242, 242);
  width: 100%;
  height: auto;
}
.jtop {
  width: 100%;
  height: 88rpx;
  background: #ffffff;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: inset 0px -1px 0px #dddddd;
}
.jtop_l {
  width: auto;
  height: 88rpx;
  display: block;
  float: left;
  font-size: 32rpx;
  color: #000000;
  line-height: 88rpx;
  margin: 0 0 0 30rpx;
}
.jtop_l image {
  width: 48rpx;
  height: 48rpx;
  display: block;
  float: left;
  margin: 20rpx 0 20rpx 0;
}
.jtop_lt {
  margin: 0 0 0 10rpx;
}
.jtop_r {
  width: auto;
  height: 88rpx;
  display: block;
  float: right;
  margin: 0rpx 20rpx 0 0;
  line-height: 88rpx;
  font-size: 32rpx;
  color: #000000;
  color: #256aff;
}
.jtop_rl {
  margin: 20rpx 30rpx 0 0;
}
.jtop_r image {
  width: 48rpx;
  height: 48rpx;
  display: block;
  float: left;
}
.jtop_c {
  width: 70%;
  height: 48rpx;
  line-height: 48rpx;
  display: block;
  float: left;
  position: fixed;
  top: 20rpx;
  left: 15%;
  text-align: center;
  font-size: 36rpx;
  color: #000000;
}
.jtop_c image {
  width: 36rpx;
  height: 36rpx;
  display: inline-block;
  float: none;
  margin-bottom: -5rpx;
  margin-left: 5rpx;
}
.jtop_b {
  width: 100%;
  height: auto;
  background: #ffffff;
  position: fixed;
  top: 88rpx;
  left: 0;
  z-index: 1001;
}
.tophr {
  width: 100%;
  height: 88rpx;
}
</style>
